Skip to content

Conversation

@adam91holt
Copy link
Contributor

Summary

Adds a new applescript engine that controls the local Spotify app directly via AppleScript instead of going through Spotify Connect cloud servers.

This solves the issue where Spotify Connect commands update the cloud state but the local Spotify.app doesn't receive them (when the device is desynced or not registered with Spotify Connect).

Changes

  • Added internal/spotify/applescript.go - AppleScript client implementation for macOS
  • Added internal/spotify/applescript_stub.go - Stub for non-darwin platforms
  • Updated internal/app/context.go - Added applescript engine case
  • Updated internal/cli/cli.go - Added applescript to engine help text

Features

The AppleScript engine:

  • Handles playback control: play, pause, next, prev, seek, volume, shuffle, repeat
  • Falls back to web API for search, library, and playlist operations (since AppleScript can't do those)
  • Only available on macOS (darwin) - returns an error on other platforms

Usage

spogo play <uri> --engine applescript
spogo status --engine applescript
spogo next --engine applescript

Why this is useful

When the local Spotify app loses its connection to Spotify Connect (which happens when it's idle), the connect/web engines update Spotify's cloud state but the local app never receives the commands. The AppleScript engine bypasses this entirely by talking directly to Spotify.app.

🤖 Generated with Claude Code

Adds a new `applescript` engine that controls the local Spotify app directly
via AppleScript instead of going through Spotify Connect cloud servers.

This solves the issue where Spotify Connect commands update the cloud state
but the local app doesn't receive them (device desynced/not registered).

The AppleScript engine:
- Handles playback control (play, pause, next, prev, seek, volume, shuffle, repeat)
- Falls back to web API for search, library, and playlist operations
- Only available on macOS (darwin)

Usage: spogo play <uri> --engine applescript

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@steipete
Copy link
Owner

steipete commented Jan 7, 2026

Thank you!

@steipete steipete merged commit 504291b into steipete:main Jan 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants